shell script

您所在的位置:网站首页 windows call shell script

shell script

2024-04-28 09:29| 来源: 网络整理| 查看: 265

You are trying to run a Linux command at the Windows Command Prompt.

On Linux the forward slash is a path separater. On Windows the backslash is a path separator and the forward slash generally indicates an argument.

Therefore, Windows thinks you are trying to run a command called "." and parsing it the argument "/name.sh". The correct convention would be ".\name.sh". Additionally Windows will automatically search the current directory for your command so you could just type "name.sh".

The next problem you will face is that Windows does not know what a sh script is, again this is a Linux thing. You could solve this by installing Cygwin if you really want or need to run a sh script.

However, judging by one of your previous comments you could just as well rename the script to name.bat and delete the "#!/bin/sh" line. Now you have a Batch file which Windows should understand. You can read more about batch files here.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3